<?php

/*
  | --------------------------------------------------------------------------------------------------
  | <template_email>
  |
  | Desenvolvedor:	Eduardo Sirangelo
  | E-mail:		sirangelos@ibest.com.br
  | Descrição:
  |	-
  | Quality is Everyting
  | --------------------------------------------------------------------------------------------------
 */

if (!defined('BASEPATH')) exit('No direct script access allowed');

class Template_email {

    private $message;
    private $host;
    private $user;
    private $passwd;
    private $login;
    
    public function getMessage() {
        return $this -> message;
    }

    public function setMessage($message) {
        $this -> message = $message;
        return true;
    }
    
    
    public function getHost() {
        return $this -> host;
    }

    public function setHost($host) {
        $this -> host = $host;
        return true;
    }
    
    
    public function getUser() {
        return $this -> user;
    }

    public function setUser($user) {
        $this -> user = $user;
        return true;
    }
    
    
    public function getPasswd() {
        return $this -> passwd;
    }

    public function setPasswd($passwd) {
        $this -> passwd = $passwd;
        return true;
    }
    
    
    public function getLogin() {
        return $this -> login;
    }

    public function setLogin($login) {
        $this -> host = $login;
        return true;
    }
    
    public function email_criar() {
        
        $file   =  '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                    <html xmlns="http://www.w3.org/1999/xhtml">
                    <head>
                            <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
                            <title>Sistema de Email</title>
                    </head>
                    <body style="padding:0; margin:0; background:#dddddd">

                    <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#dddddd">
                            <tr>
                                    <td align="center" valign="top">

                                            <table width="600" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                            <td>
                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="10" bgcolor="#ffffff">
                                                                            <tr>
                                                                                    <td>
                                                                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                                                    
                                                                                                    <tr>
                                                                                                        <td style="font-size:0; line-height:0;">
                                                                                                            <a href="http://www.escolalafayette.com.br"><img src="' . base_url()  . 'public/images/logo.png" border="0" alt="" /></a>
                                                                                                        </td>
                                                                                                    </tr>
                                                                                                    
                                                                                                    <tr>
                                                                                                            <td bgcolor="#3F835E">
                                                                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="8">
                                                                                                                            <tr>
                                                                                                                                    <td style="color:#fff; font-size:11px; font-weight:bold; font-family:Arial; font-style:italic; " align="right"></td>
                                                                                                                            </tr>
                                                                                                                    </table>
                                                                                                            </td>
                                                                                                    </tr>

                                                                                                    <tr><td style="font-size:0; line-height:0;" height="10">&nbsp;</td></tr>
                                                                                                    <tr>
                                                                                                            <td>
                                                                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                                                                            <tr>

                                                                                                                                <td valign="top">&nbsp;</td>

                                                                                                                                <td valign="top">

                                                                                                                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">

                                                                                                                                                    <tr>
                                                                                                                                                            <td>
                                                                                                                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#AAAAAA">
                                                                                                                                                                            <tr>
                                                                                                                                                                                    <td style="font-size:0; line-height:0;" width="10" align="left">&nbsp;</td>
                                                                                                                                                                                    <td style="font-family: Arial; font-size:14px; line-height:30px; color:#FFF; font-weight:bold; text-align:left; text-transform:uppercase;">' . html_entity_decode("Criação / Alteração de Conta Master ou Sub-Conta") . '</td>
                                                                                                                                                                                    <td style="font-size:0; line-height:0;" width="20" align="right">&nbsp;</td>
                                                                                                                                                                            </tr>
                                                                                                                                                                    </table>
                                                                                                                                                            </td>
                                                                                                                                                    </tr>
                                                                                                                                                    <tr>
                                                                                                                                                            <td>
                                                                                                                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="10">
                                                                                                                                                                            <tr>
                                                                                                                                                                                    <td style="font-family: Arial; font-size:12px; line-height:16px; text-align:left; color:#333;">
                                                                                                                                                                                            <ul style="padding:0 15px; margin:0; color:#3F835E; line-height:20px; ">
                                                                                                                                                                                                <li><a href="#" style="color:#000000; text-decoration:none;font-size:12px"><b>Url de acesso:</b>' . $this->getHost() . '</a></li>
                                                                                                                                                                                                <li><a href="#" style="color:#000000; text-decoration:none;font-size:12px"><b>' . html_entity_decode("Usuário") . ':</b>' . html_entity_decode($this->getUser()) . '</a></li>
                                                                                                                                                                                                <li><a href="#" style="color:#000000; text-decoration:none;font-size:12px"><b>' . html_entity_decode("Senha") . ':</b>' . html_entity_decode($this->getPasswd()) . '</a></li>
                                                                                                                                                                                            </ul><br />
                                                                                                                                                                                    </td>
                                                                                                                                                                            </tr>
                                                                                                                                                                    </table>
                                                                                                                                                            </td>
                                                                                                                                                    </tr>

                                                                                                                                            </table>

                                                                                                                                    </td>
                                                                                                                            </tr>
                                                                                                                    </table>
                                                                                                            </td>
                                                                                                    </tr>

                                                                                            </table>
                                                                                    </td>
                                                                            </tr>
                                                                    </table>
                                                            </td>
                                                    </tr>

                                                    <tr>
                                                            <td style="font-size:0; line-height:0;"><img src="' . base_url()  . 'public/images/b.gif" alt="" /></td>
                                                    </tr>
                                            </table>

                                    </td>
                            </tr>
                    </table>
                    </body>
                    </html>
                    ';
        
        return $file;
    }
    
    public function email_editar() {
    
        $file   =  '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                    <html xmlns="http://www.w3.org/1999/xhtml">
                    <head>
                            <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
                            <title>Sistema de Email</title>
                    </head>
                    <body style="padding:0; margin:0; background:#dddddd">

                    <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#dddddd">
                            <tr>
                                    <td align="center" valign="top">

                                            <table width="600" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                            <td>
                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="10" bgcolor="#ffffff">
                                                                            <tr>
                                                                                    <td>
                                                                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                                                    
                                                                                                    <tr>
                                                                                                        <td style="font-size:0; line-height:0;">
                                                                                                            <a href="http://www.escolalafayette.com.br"><img src="' . base_url()  . 'public/images/logo.png" border="0" alt="" /></a>
                                                                                                        </td>
                                                                                                    </tr>
                                                                                                    
                                                                                                    <tr>
                                                                                                            <td bgcolor="#3F835E">
                                                                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="8">
                                                                                                                            <tr>
                                                                                                                                    <td style="color:#fff; font-size:11px; font-weight:bold; font-family:Arial; font-style:italic; " align="right"></td>
                                                                                                                            </tr>
                                                                                                                    </table>
                                                                                                            </td>
                                                                                                    </tr>

                                                                                                    <tr><td style="font-size:0; line-height:0;" height="10">&nbsp;</td></tr>
                                                                                                    <tr>
                                                                                                            <td>
                                                                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                                                                            <tr>

                                                                                                                                <td valign="top">&nbsp;</td>

                                                                                                                                <td valign="top">

                                                                                                                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">

                                                                                                                                                    <tr>
                                                                                                                                                            <td>
                                                                                                                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#AAAAAA">
                                                                                                                                                                            <tr>
                                                                                                                                                                                    <td style="font-size:0; line-height:0;" width="10" align="left">&nbsp;</td>
                                                                                                                                                                                    <td style="font-family: Arial; font-size:14px; line-height:30px; color:#fff; font-weight:bold; text-align:left; text-transform:uppercase;">' . html_entity_decode("Criação / Alteração de Conta Master ou Sub-Conta") . '</td>
                                                                                                                                                                                    <td style="font-size:0; line-height:0;" width="20" align="right">&nbsp;</td>
                                                                                                                                                                            </tr>
                                                                                                                                                                    </table>
                                                                                                                                                            </td>
                                                                                                                                                    </tr>
                                                                                                                                                    <tr>
                                                                                                                                                            <td>
                                                                                                                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="10">
                                                                                                                                                                            <tr>
                                                                                                                                                                                    <td style="font-family: Arial; font-size:12px; line-height:16px; text-align:left; color:#333;font-size:13px">'. html_entity_decode('Dados da conta ' . $this->getUser() . ' foram editados em ' . date("d/m/Y H:i:s") . ' pelo usuário ' . $this->getLogin()). '</td>
                                                                                                                                                                            </tr>
                                                                                                                                                                    </table>
                                                                                                                                                            </td>
                                                                                                                                                    </tr>

                                                                                                                                            </table>

                                                                                                                                    </td>
                                                                                                                            </tr>
                                                                                                                    </table>
                                                                                                            </td>
                                                                                                    </tr>

                                                                                            </table>
                                                                                    </td>
                                                                            </tr>
                                                                    </table>
                                                            </td>
                                                    </tr>

                                                    <tr>
                                                            <td style="font-size:0; line-height:0;"><img src="' . base_url()  . 'public/images/b.gif" alt="" /></td>
                                                    </tr>                                                    
                                            </table>

                                    </td>
                            </tr>
                    </table>
                    </body>
                    </html>
                    ';
        
        return $file;
    }
    
    public function email_default() {
    
        $file   =  '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                    <html xmlns="http://www.w3.org/1999/xhtml">
                    <head>
                            <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
                            <title>Sistema de Email</title>
                    </head>
                    <body style="padding:0; margin:0; background:#dddddd">

                    <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#dddddd">
                            <tr>
                                    <td align="center" valign="top">

                                            <table width="600" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                            <td>
                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="10" bgcolor="#ffffff">
                                                                            <tr>
                                                                                    <td>
                                                                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                                                    
                                                                                                    <tr>
                                                                                                        <td style="font-size:0; line-height:0;">
                                                                                                            <a href="http://www.escolalafayette.com.br"><img src="' . base_url()  . 'public/images/logo.png" border="0" alt="" /></a>
                                                                                                        </td>
                                                                                                    </tr>
                                                                                                    
                                                                                                    <tr>
                                                                                                            <td bgcolor="#3F835E">
                                                                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="8">
                                                                                                                            <tr>
                                                                                                                                    <td style="color:#fff; font-size:11px; font-weight:bold; font-family:Arial; font-style:italic; " align="right"></td>
                                                                                                                            </tr>
                                                                                                                    </table>
                                                                                                            </td>
                                                                                                    </tr>

                                                                                                    <tr><td style="font-size:0; line-height:0;" height="10">&nbsp;</td></tr>
                                                                                                    <tr>
                                                                                                            <td>
                                                                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                                                                            <tr>

                                                                                                                                <td valign="top">&nbsp;</td>

                                                                                                                                <td valign="top">

                                                                                                                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">

                                                                                                                                                    <tr>
                                                                                                                                                            <td>
                                                                                                                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#AAAAAA">
                                                                                                                                                                            <tr>
                                                                                                                                                                                    <td style="font-size:0; line-height:0;" width="10" align="left">&nbsp;</td>
                                                                                                                                                                                    <td style="font-family: Arial; font-size:14px; line-height:30px; color:#fff; font-weight:bold; text-align:left; text-transform:uppercase;">' . html_entity_decode("Informação") . '</td>
                                                                                                                                                                                    <td style="font-size:0; line-height:0;" width="20" align="right">&nbsp;</td>
                                                                                                                                                                            </tr>
                                                                                                                                                                    </table>
                                                                                                                                                            </td>
                                                                                                                                                    </tr>
                                                                                                                                                    <tr>
                                                                                                                                                            <td>
                                                                                                                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="10">
                                                                                                                                                                            <tr>
                                                                                                                                                                                    <td style="font-family: Arial; font-size:12px; line-height:16px; text-align:left; color:#333;">'. html_entity_decode($this->getMessage()). '</td>
                                                                                                                                                                            </tr>
                                                                                                                                                                    </table>
                                                                                                                                                            </td>
                                                                                                                                                    </tr>

                                                                                                                                            </table>

                                                                                                                                    </td>
                                                                                                                            </tr>
                                                                                                                    </table>
                                                                                                            </td>
                                                                                                    </tr>

                                                                                            </table>
                                                                                    </td>
                                                                            </tr>
                                                                    </table>
                                                            </td>
                                                    </tr>

                                                    <tr>
                                                            <td style="font-size:0; line-height:0;"><img src="' . base_url()  . 'public/images/b.gif" alt="" /></td>
                                                    </tr>                                                    
                                            </table>

                                    </td>
                            </tr>
                    </table>
                    </body>
                    </html>
                    ';
        
        return $file;
    }
    
}
?>
